<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title></title>
    #parse("include/header.html")
    <!-- 引入样式 -->
    <link rel="stylesheet" href="https://unpkg.com/element-ui/lib/theme-chalk/index.css">
    <style type="text/css">
        .el-upload-list--picture .el-upload-list__item {
            width: 200px;
            display: inline-block;
            margin-right: 10px;
        }

        .el-upload-list__item-name {
            margin-right: 0;
        }
    </style>
</head>
<body>
<div id="taskInfo">
    <p style="border-left: 2px solid #0e90d2;padding-left: 20px;">新建任务</p>
    <hr style="border: 1px solid #ebeef5;"/>
    <div>
        <div class="el-col-sm-12">
            <el-form ref="taskForm" :model="taskForm"  label-width="7em">
                <el-form-item label="任务描述" prop="content">
                    <el-input
                            type="textarea"
                            :autosize="{ minRows: 2, maxRows: 4}"
                            placeholder="请输入内容"
                            v-model="taskForm.content"
                            @blur="isContent()">
                    </el-input>
                    <p id="checkConten" style="color: red;display: none" >请输入任务内容！</p>
                </el-form-item>
                <el-form-item label="设置时间" required>
                  <el-col :span="8">
                    <el-form-item prop="date1">
                      <el-date-picker
                            v-model="taskForm.date1"
                            type="datetime"
                            placeholder="选择日期时间"
                            @blur="isDate1()">
                      </el-date-picker>
                      <p id="checkDate1" style="color: red;display: none">请选择任务开始时间！</p>
                    </el-form-item>
                  </el-col>
                  <el-col  :span="1">-</el-col>
                    <el-col :span="8">
                        <el-form-item prop="date2">
                            <el-date-picker
                                    v-model="taskForm.date2"
                                    type="datetime"
                                    placeholder="选择日期时间"
                                    @blur="isDate2()">
                            </el-date-picker>
                            <p id="checkDate2" style="color: red;display: none">请选择任务结束时间！</p>
                        </el-form-item>
                    </el-col>
                </el-form-item>

                <!--<el-form-item label="负责人" prop="name">
                    <el-dropdown trigger="click">
				      <span class="el-dropdown-link">
				        <el-input v-model="taskForm.name" style="width: 220px;"></el-input>
				      </span>
                        <el-dropdown-menu slot="dropdown" style="padding:10px;">
                            <el-input v-model="taskForm.bb" style="width: 200px;" placeholder="搜索成员"
                                      size="small"></el-input>
                            <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick" node-key="id"
                                     :default-expanded-keys="[1, 2]"
                                     style="max-height: 220px;overflow: auto;"></el-tree>
                        </el-dropdown-menu>
                    </el-dropdown>
                </el-form-item>-->
                <!--<el-form-item label="是否重复" prop="region">
                    <el-select v-model="taskForm.region" placeholder="请选择" clearable>
                        <el-option label="不重复" value="0"></el-option>
                        <el-option label="工作日" value="1"></el-option>
                        <el-option label="工作日（含周末）" value="2"></el-option>
                        <el-option label="每周" value="3"></el-option>
                        <el-option label="每月" value="4"></el-option>
                    </el-select>
                </el-form-item>-->
                <el-form-item label="是否重复"  prop="region" @blur="isRegin()">
                    <el-select v-model="taskForm.region" placeholder="请选择" clearable>
                        <el-option v-for="item in regionItems" :key="item.regionId" :label="item.regionName" :value="item.regionId">
                        </el-option>
                    </el-select>
                    <p id="checkRegion" style="color: red;display: none">请选择重复类型！</p>
                </el-form-item>
                <!--<el-form-item label="上传文件" prop="fileList">
                    &lt;!&ndash;<el-upload  :file-list="fileList2" list-type="picture">
                        <el-button size="small" type="primary">点击上传</el-button>
                        <div slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过500kb</div>
                    </el-upload>&ndash;&gt;
                    <el-upload
                        :http-request="uploadFile"
                        :file-list="fileList2"
                        list-type="picture">
                       &lt;!&ndash; <i class="el-icon-picture" style="font-size: 18px;"></i>
                        &nbsp;<span slot="tip" class="el-upload__tip">只能上传jpg/png文件，且不超过4MB</span>&ndash;&gt;
                    </el-upload>
                </el-form-item>-->
                <el-form-item>
                    <el-button type="primary" @click="onSubmit('taskForm')" size="small">保存</el-button>
                    <el-button type="primary" @click="onReset()" size="small">返回</el-button>
                </el-form-item>
            </el-form>
        </div>
    </div>
</div>
#parse("include/footer.html")
<!-- 先引入 Vue -->
<!-- 引入组件库 -->
<script src="https://unpkg.com/element-ui/lib/index.js"></script>
<script src="${rc.contextPath}/statics/js/task/task/add.js"></script>
</body>
</html>
